<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
	<meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
	<title>填写并核对订单信息</title>	
	<link rel="stylesheet" href="__TPL__/css/head.css"  type="text/css" />
	<script type="text/javascript" src='__TPL__/js/jquery-1.11.0.min.js'></script>
	<script type="text/javascript" src='__TPL__/js/head.js'></script>
	<script type="text/javascript" src='__TPL__/js/dingdan2.js'></script>
	<link rel="stylesheet" href="__TPL__/css/dingdan2.css" />
</head>
<body>
<!-- 最顶部的可关闭广告 -->
<!-- <div id='top_ad'><img src="__TPL__/images/top_ad.jpg" alt="" /></div> -->
<!-- 最顶部的可关闭广告结束-->
<!-- 头部灰色区域 -->
	<div id="top">
		<div class="top_main">
			<!-- 左侧 -->
			<div class="top_l fl">
				<p class="shoucang"><span class='fl'></span><a href="" class='fl'>收藏京东</a></p>
				<p class="didian"><span class='tu fl'></span><span class='wenzi fl'>北京</span></p>
			</div>
			<!-- 左侧结束 -->
			<!-- 右侧 -->
			<div class="top_r fr ">
				<ul>
					<li><span class='fl'>您好，欢迎来到京东！</span><a href="" class='fl'>[登录]</a> <a href="" class="denglu fl">[免费注册]</a> <span class='xian fl'>|</span></li>
					<li><a href="" class="dingdan fl">我的订单</a><span class='xian fl'>|</span></li>
					<li class='huiyuan'><a href="" class='fl'>会员俱乐部</a><span class='xian fl'>|</span></li>
					<li class="shouji">
						<div class="xia">
							<div class="xia_top">
								<div class="xia_top_l"></div>
								<div class="xia_top_r">
									<span>扫描我，即刻下载</span>
									<span class='hongse'>京东客户端</span>
								</div>
							</div>
							<div class="xia_foot">
								<span class='xia_foot1'></span><span class='xia_foot2'></span>
							</div>
						</div>
						<div class="topnei"><span></span></div>
						<p>
							<a href="" class="fl">手机京东</a><span class='daosan fl'></span><span class='xian fl'>|</span>
						</p>
						
					</li>
					<li class="li_kehu">
						<div class='xiabai'>
							<a href="">帮助中心</a>
							<a href="">售后服务</a>
							<a href="">在线客服</a>
							<a href="">投诉中心</a>
							<a href="">客服邮箱</a>
						</div>
						<div class="kehu">
							<a href="" class='fl'>客户服务</a><span class='daosan fl'></span><span class='xian fl'>|</span>
						</div>
						
					</li>
					<li class="li_kong">
						<div class="kong_wang">
							
						</div>
						<div class="wang">
							<a href="" class='fl'>网站导航</a><span class='daosan fl'></span>
						</div>
						<div class="kong_wang_da">
							<div class="kong_l">
								<p>特色栏目</p>
								<a href="">校园之星</a>
								<a href="">视频购物</a>
								<a href="">京东社区</a>
								<a href="">在线读书</a>
								<a href="">装机大师</a>
								<a href="">京东卡</a>
								<a href="">家装城</a>
								<a href="">搭配购</a>
								<a href="">我喜欢</a>
							</div>
							<div class="kong_m">
								<p>企业服务</p>
								<a href="">企业客户</a>
								<a href="">办公直通车</a>
							</div>
							<div class="kong_r">
							<p>旗下网站</p>
							<a href="">迷你挑</a>
							<a href="">English Site</a>
							</div>
							
						</div>
					</li>
				</ul>
			</div>
			<!-- 右侧结束 -->
		</div>
		
	</div>
<!-- 头部灰色区域结束 -->
<!-- 中间主体区域 -->
	<div id="main">
		<div id="logo">
			<a href="" class="logo"><img src="__TPL__/images/logo.png" alt="" /></a>
			<div class="r">
				<span class='buzhou1'>1.我的购物车</span>
				<span class='buzhou2'>2.填写核对订单信息</span>
				<span class='buzhou3'>3.成功提交订单</span>
			</div>
		</div>
		<div id="dizhi">
			<h2>填写并核对订单信息</h2>
			<div class="di_show">
				<h2 class="pl10">收货人信息 <a href="javascript:;" class='xiugai ml5 blue2'>[修改]</a></h2>
				<p class="pl10 gray">
					<span class="mt10" id="addname">{$hd.session.address.name}</span> <span id="addphone">{$hd.session.address.phone}</span>
				</p>
				<p class="pl10 mt10 gray" id="addaddress">
					{$hd.session.address.address}
				</p>
			</div>
<script type="text/javascript">
	$('.xiugai').click(function(){
		$('.xiugaishow').show();
	})
</script>
			<div class="di dn xiugaishow p20">
				<h3>收件人地址</h3>

				<table class="p10">
					<list from="$dizhi" name="d">
						<tr>
							<td colspan="2"><input type="radio" name="said" id="" value="{$d.said}" <if value="$d.said eq $hd.session.address.said">checked=""</if> /> {$d.name} {$d.address} {$d.phone}</td>
						</tr>
					</list>
					<tr>
						<td colspan="2"><input type="radio" value="0" name="said" id="newAddress"  /> 使用新地址</td>
					</tr>
					<tr>
						<td colspan="2">
							<table id="newaddressform" style="display:none;">
								<form  action="{|U('address')}" method="post" onsubmit="return addAddress(this);">	
								<tr>
										<td>*收货人:&nbsp;&nbsp;</td>
										<td><input type="text" name="name" id="" class="w150" /></td>
									</tr>
									<tr>
										<td>*所在地区:&nbsp;&nbsp;</td>
										<td>
											<select name="sheng" id="">
												<option value="">所在省</option>
												<option value="江苏">江苏</option>
											</select>
											<select name="shi" id="">
												<option value="">所在市</option>
												<option value="徐州">徐州</option>
											</select>
											<select name="xian" id="">
												<option value="">所在县</option>
												<option value="新沂">新沂</option>
											</select>
										</td>
									</tr>
									<tr>
										<td>*详细地址:&nbsp;&nbsp;</td>
										<td><input type="text" name="xiangxi" id="" class="w300" /></td>
									</tr>
									<tr>
										<td>*手机号码:&nbsp;&nbsp;</td>
										<td><input type="text" name="phone" id="" class="w150" /></td>
									</tr>
									<tr>
										<td>固定电话:&nbsp;&nbsp;</td>
										<td><input type="text" name="tel" id="" class="w150" /></td>
									</tr>
									<tr>
										<td>&emsp;&emsp;邮编:&nbsp;&nbsp;</td>
										<td><input type="text" name="postcode" id="" class="w150" /></td>
									</tr>
									<tr>
										<td>&emsp;&emsp;邮箱:&nbsp;&nbsp;</td>
										<td><input type="text" name="email" id="" class="w150" /></td>
									</tr>
									<tr>
										<td colspan="2">
											<input type="submit" class="hand mt20 bgred-2 rad2 fm f18 white p10" value="保存收货人信息" />
										</td>
									</tr>
								</form>
							</table>
						</td>
					</tr>
				</table>

<script type="text/javascript">
//收件人地址切换时
$('input[name=said]').click(function(){
	var said=$(this).val(),
		url='{|U("changeAddress")}',
		reUrl='{|U("dingdan")}';
	$.post(url,{said:said},function(re){
		// location.href=reUrl;
		$('#addname').html(re.name);
		$('#addphone').html(re.phone);
		$('#addaddress').html(re.address);
	},'json')
})
//点击使用新地址时候使用
$('#newAddress').click(function() {
	$('#newaddressform').show();
});
	function addAddress(id){
		var url=$(id).attr('action');
		$.post(url,$(id).serialize(),function(re){
			if(re==1){
				$.msg({str:'保存成功！',close:function(){
					$('.xiugaishow').hide();
				}});
			}else{
				$.msg({str:'信息填写不正确！',shade:1});
			}
		})
		return false;
	}
</script>
			</div>













			<div class="qingdan p10">
				<div class="fm f14 p10">商品清单</div>
				<table class="p5 bde pct100">
					<tr class="bgwhite-1">
						<td class="p10 tc">商品</td>
						<td class="p10 tc">京东价</td>
						<td class="p10 tc">优惠</td>
						<td class="p10 tc">数量</td>
						<td class="p10 tc">库存状态</td>
					</tr>
				<list from="$goods" name="g">
					<tr class="">
						<td class="p10">
							<a href="{$g._url}" target="_blank" style="vertical-align: middle;" class="bde p2 of dib"><img style="vertical-align: middle;" src="__ROOT__/{$g.index_pic}" alt="" height="50" /></a>
							<a href="{$g._url}" target="_blank">{$g.gname} {$g._attr}</a>
						</td>
						<td class="p10 tc">￥{$g.price}</td>
						<td class="p10 tc">优惠</td>
						<td class="p10 tc">
							<?php
								$stid=$g['stid'];
								echo $_SESSION['cart']['goods'][$stid]['num']; 
							?>
						</td>
						<td class="p10 tc">有货</td>
					</tr>
				</list>
				</table>
				<p class="p5 tr gray-2"><b class="w200 mr20 tr n"><b class="red">{$hd.session.cart.total}</b> 件商品，总商品金额： </b>￥{$hd.session.cart.prices}.00</p>
				<p class="p5 tr gray-2"><b class="w200 mr20 tr n">运费： </b>￥0.00</p>
				<p class="p5 tr gray-2"><b class="w200 mr20 tr n">应付总额：</b> ￥{$hd.session.cart.prices}.00</p>
				<div class="p10 bgwhite-1">
					<p class="tr fm f16 gray-2">应付总额：￥<b class="red f22 fv">{$hd.session.cart.prices}.00</b> 元 <a href="{|U('dingdanOk')}" class=" ml10 a bgred-2 pt5 pb5 pl10 pr10 dib white f18 fm">提交订单</a></p>
				</div>
			</div>
		</div>		
		<div class="fix">&nbsp;</div>
		<!-- 底部导航 -->
		<div class="dibu_menu mt10">
			<a href="">关于我们</a> <a href="">联系我们</a> <a href="">人才招聘</a> <a href="">商家入驻</a><a href="">广告服务</a> <a href="">手机京东</a> <a href="">友情链接</a><a href="">销售联盟</a><a href="">京东社区</a> <a href="">京东公益</a><a href="" class="last">English Site</a>
		</div>
		<!-- 底部导航结束 -->
		<!-- icp信息 -->
		<div class="icp">
			<p>
				北京市公安局朝阳分局备案编号110105014669&nbsp;|&nbsp;京ICP证070359号&nbsp;|&nbsp;互联网药品信息服务资格证编号(京)-非经营性-2011-0034 <br />
				<a href="">音像制品经营许可证苏宿批005号</a>&nbsp;|&nbsp;出版物经营许可证编号新出发(苏)批字第N-012号&nbsp;|&nbsp;互联网出版许可证编号新出网证(京)字150号
				<br />
				<a href="">网络文化经营许可证京网文[2011]0168-061号</a>Copyright&nbsp;©&nbsp;2004-2014&nbsp;&nbsp;京东JD.com&nbsp;版权所有	
				<br />
				京东旗下网站：<a href="">360TOP</a><a href="">迷你挑</a>
			</p>
			<div class="icp_img clear">
				<a href="" class="icp_img1"><img src="__TPL__/images/icp_img1.gif" alt="" /></a>
				<a href="" class="icp_img2"><img src="__TPL__/images/icp_img2.gif" alt="" /></a>
				<a href="" class="icp_img3"><img src="__TPL__/images/icp_img3.png" alt="" /></a>
				<a href="" class="icp_img3"><img src="__TPL__/images/icp_img4.png" alt="" /></a>
			</div>

		</div>
		<!-- icp信息结束 -->
	</div>
<!-- 中间主体区域结束 -->
</body>
</html>